package com.bop.dehong.huodong;

import com.base.dehong.base.AdapterBase;
import com.bop.dehong.R;
import com.bop.dehong.info.HuodongInfo;
import com.bop.dehong.util.ImageLoaderUtils;

import android.app.Activity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

public class HuodongListAdapter extends AdapterBase<HuodongInfo>{

	public HuodongListAdapter(Activity context) {
		super(context);
	}

	@Override
	public View getView(int i, View view, ViewGroup viewgroup) {
		ViewHolder holder;
		if (view == null) {
			holder = new ViewHolder();
			view = View.inflate(mContext, R.layout.item_huodong_list, null);
			holder.imageView = getView(view, R.id.imageView1);
			view.setTag(holder);
		}else {
			holder = (ViewHolder) view.getTag();
		}
		HuodongInfo info = get(i);
		ImageLoaderUtils.getInstance(mContext).setImageNetResource(holder.imageView, info.thumb);
		
		return view;
	}
	class ViewHolder{
		ImageView imageView ;
	}
}
